<template>
  <div>
  <el-form :model="queryParams">
    <el-input
      v-model="queryParams.id"
      placeholder="请输入作业id"
    />
    <el-button type="primary" icon="el-icon-search" size="mini" @click="A">通过作业id查询作业</el-button>
  </el-form>

    <div>
      <el-table :data="tableData1">
        <el-table-column label="作业id" align="center" prop="id" />
        <el-table-column label="作业名" align="center" prop="title" />
        <el-table-column label="开始时间" align="center" prop="startTime"/>
        <el-table-column label="结束时间" align="center" prop="endTime" />
        <el-table-column label="创建时间" align="center" prop="createTime" />
        <el-table-column label="创建者" align="center" prop="creator" />
      </el-table>
    </div>


  </div>
</template>

<script>
  import { searchTopicByC} from "@/api/searchTopic";
    export default {
        name: "searchTopic",
      created() {
      },
      data(){
        return {
          tableData1:{
            id: undefined,
            title:undefined,
            startTime:undefined,
            endTime: undefined,
            createTime: undefined,
            creator: undefined
          },
          queryParams: {
            pageNum: 1,
            pageSize: 10,
            id: null,
          }
        }
      },
      methods: {
        A() {
          searchTopicByC(this.queryParams.id).then(response => {
              this.tableData1 = response
            }
          );
        }
      }

    }
</script>

<style scoped>

</style>
